// Tested and working fixed the issue for you, your problem was where marked bottom line of client


if( SERVER ) then
	AddCSLuaFile( "shared.lua" )
	SWEP.HoldType = "melee"
end
if( CLIENT ) then 
	SWEP.PrintName = "Ban Stunstick"
	SWEP.Slot = 0
	SWEP.SlotPos = 5
	SWEP.DrawAmmo = false
	SWEP.DrawCrosshair = false
	SWEP.DrawAmmo			= true
	SWEP.DrawCrosshair		= true
	SWEP.ViewModelFOV		= 60
	SWEP.ViewModelFlip		= false
	SWEP.CSMuzzleFlashes	= false
	SWEP.IconLetter = "b" // You forgot to put the iconletter it puts it in menu!

 
end
 
// Variables that are used on both client and server
 
SWEP.Author               ="ahref"
SWEP.Instructions       = "Left click to kick, Right click to ban"
SWEP.Category 	= "ahref's"
 
SWEP.ViewModelFOV       = 62
SWEP.ViewModelFlip      = false
SWEP.AnimPrefix  = "stunstick"
 
SWEP.Spawnable      = false
SWEP.AdminSpawnable          = true
  
SWEP.ViewModel = Model( "models/weapons/v_stunstick.mdl" )
SWEP.WorldModel = Model( "models/weapons/w_stunbaton.mdl" )
  
SWEP.Sound = Sound( "weapons/stunstick/stunstick_swing1.wav" )
SWEP.Sound1 = Sound( "npc/metropolice/vo/moveit.wav" )
SWEP.Sound2 = Sound( "npc/metropolice/vo/movealong.wav" )
 
SWEP.Primary.ClipSize      = 0                                   // Size of a clip
SWEP.Primary.DefaultClip        = 0                    // Default number of bullets in a clip
SWEP.Primary.Automatic    = false            // Automatic/Semi Auto
SWEP.Primary.Ammo                     = ""
 
SWEP.Secondary.ClipSize  = 0                   // Size of a clip
SWEP.Secondary.DefaultClip      = 0            // Default number of bullets in a clip
SWEP.Secondary.Automatic        = false    // Automatic/Semi Auto
SWEP.Secondary.Ammo               = ""
 
 
 
/*---------------------------------------------------------
   Name: SWEP:Initialize( )
   Desc: Called when the weapon is first loaded
---------------------------------------------------------*/
function SWEP:Initialize() 
	if( SERVER ) then
		self:SetWeaponHoldType( "melee" )
	end
 end 
/*---------------------------------------------------------
   Name: SWEP:PrimaryAttack( )
   Desc: +attack1 has been pressed
---------------------------------------------------------*/
function SWEP:PrimaryAttack()
	self.Owner:SetAnimation( PLAYER_ATTACK1 )
	self.Weapon:EmitSound( self.Sound )
	self.Weapon:SendWeaponAnim( ACT_VM_HITCENTER )
	if( CLIENT ) then return end
	local vStart = self.Owner:GetShootPos()
	local vForward = self.Owner:GetAimVector()
	local trace = {}
	trace.start = vStart
	trace.endpos = vStart + (vForward * 2048)
	trace.filter = self.Owner	
	local tr = util.TraceLine( trace )
	if !tr.Entity:IsValid() then return end
	//If a player and not an admin, kick and ban them.
	if tr.Entity:IsPlayer() and !tr.Entity:IsAdmin() then
		game.ConsoleCommand( "ulx kick " .. tr.Entity:Name() .. " \"WOOT WOOT\" \n" )
	end
end
 
  /*---------------------------------------------------------
   Name: SWEP:SecondaryAttack( )
   Desc: +attack2 has been pressed
  ---------------------------------------------------------*/
function SWEP:SecondaryAttack()
	self.Owner:SetAnimation( PLAYER_ATTACK1 )
	self.Weapon:EmitSound( self.Sound )
	self.Weapon:SendWeaponAnim( ACT_VM_HITCENTER )
	local vStart = self.Owner:GetShootPos()
	local vForward = self.Owner:GetAimVector()
	local trace = {}
	trace.start = vStart
	trace.endpos = vStart + (vForward * 2048)
	trace.filter = self.Owner	
	local tr = util.TraceLine( trace )
	if !tr.Entity:IsValid() then return end
	//If a player and not an admin, kick and ban them.
	if tr.Entity:IsPlayer() and !tr.Entity:IsAdmin() then
		game.ConsoleCommand( "ulx ban " .. tr.Entity:Name() .. " \n" )
		game.ConsoleCommand( "ulx kick " .. tr.Entity:Name() .. " \"WOOT WOOT\" \n")
	end 
  end 